<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
           uri="/WEB-INF/tags/shiro.tld"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>生成规则选择</title>
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <jsp:include
            page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtablemanager/table_rule_manager.js"></script>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <%
        String sysId = request.getParameter("sysId");
    %>
    <script type="text/javascript">
        //设置高度
        function getScreenWidth(){
            return window.document.body.offsetWidth -300;
        }
        var dialogId = "${dialogId}"; //打开页面传递的模块ID
        var colName = "${colName}";
        var selCodeOld = "${selCodeOld}";
        var module = "${module}";
        var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
        //此事件必须放在jsp中,不能提取到js中,否则不能加载数据
        $(function() {
            sysId = "<%=sysId%>";
            mySelectRuleDatagrid = $('#commSelectRuleDataGrid')
                .datagrid(
                    {
                        url : 'platform/aos/commtempletmanagerController/getCommTempletRuleData.json'
                    });
        });
    </script>
    <style type="text/css">
        .textbox {
            border: solid 1px #a5acb5;
        }

        .input,img {
            vertical-align: middle;
        }

        <!--
        实现input和img水平对齐 -->.labelbg {
                               background:
                                       url('../../js/jQuery/jquery-easyui-1.3.5/themes/icons/required.gif')
                                       right 0 no-repeat;
                           }
    </style>
</head>
<body id="myBody" class="easyui-layout">
<form id="formSelect" method="post">
    <div data-options="region:'west',title:'',split:true,border:false,collapsible:false"   style="overflow-y: hidden;width: 800px;height: 100%;">
        <div class="easyui-layout" data-options="fit:true">
            <div data-options="region:'center'"
                 style="overflow-y: hidden; height: 100%;">
                <table id="fieldButton" style="overflow-x: auto; overflow-y: hidden;"
                       border="0">
                    <tr>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_button_addRecord">
                            <td><a class="easyui-linkbutton" plain="true"
                                   iconCls="icon-im-add" onclick="append();"
                                   href="javascript:void(0);" id="addRecord">添加</a></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_button_deleteRecord">
                            <td><a class="easyui-linkbutton" plain="true"
                                   iconCls="icon-im-remove" onclick="removeit();"
                                   href="javascript:void(0);" id="deleteRecord">删除</a></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_button_save">
                            <td><a class="easyui-linkbutton" plain="true"
                                   iconCls="icon-im-save" onclick="save();"
                                   href="javascript:void(0);" id="save">保存</a></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_button_submitButton">
                            <td><a class="easyui-linkbutton" plain="true"
                                   iconCls="icon-im-submit" onclick="submitSelest('formSelect');"
                                   href="javascript:void(0);" id="submitButton">选择</a></td>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_button_back">
                            <td><a class="easyui-linkbutton" plain="true"
                                   iconCls="icon-im-back" onclick="closeWindow();"
                                   href="javascript:void(0);" id="back">返回</a></td>
                        </sec:accesscontrollist>
                    </tr>
                </table>
                <table id="commSelectRuleDataGrid" class="easyui-datagrid"
                       data-options="
					rownumbers: true,
					animate: true,
					collapsible: false,
					fitColumns: true,
					autoRowHeight: false,
					pagination:true,
					pageSize:100,
					pageList:[100,150,200],
		    		striped:true,
					fit:true,
					method: 'post',
					url: 'platform/aos/commtempletmanagerController/getCommTempletRuleData.json'
				">
                    <thead>
                    <tr>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_datagrid_ID">
                            <th data-options="field:'ID', halign:'center',checkbox:true"
                                title="主键ID" width="20">主键ID</th>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_datagrid_SEL_CODE">
                            <th
                                    data-options="field:'SEL_CODE', halign:'center', align:'center', sortable:false,hidden:true"
                                    width="100" title="字段英文名">代码</th>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_datagrid_SEL_NAME">
                            <th
                                    data-options="field:'SEL_NAME', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{required:true,validType:'length[0,20]'}}"
                                    width="50" title="名称"><img
                                    src="avicit/im/common/im_themes_extend/required.gif" alt="必填">名称</th>
                        </sec:accesscontrollist>
                        <sec:accesscontrollist  hasPermission="3" domainObject ="commtablemanager_table_rule_manager_datagrid_SEL_URL">
                            <th
                                    data-options="field:'SEL_URL', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{required:true}}"
                                    width="100" title="路径"><img
                                    src="avicit/im/common/im_themes_extend/required.gif" alt="必填">路径</th>
                        </sec:accesscontrollist>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</form>
</body>
</html>
